/*
 * Copyright (C) 2009-2012 - Roman Kalynchuk
 *
 * This file is part of REngine.
 *
 * REngine is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * REngine is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with REngine.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef __IKERNEL_H__
#define __IKERNEL_H__

#include "kernel/platform.h"
#include "kernel/isubsystem.h"
#include "kernel/ilog.h"
#include "kernel/ilogwriter.h"
#include "kernel/ifilesystem.h"
#include "kernel/ivarsystem.h"
#include "kernel/icmdsystem.h"
#include "kernel/isystem.h"
#include "kernel/iupdatesystem.h"
#include "input/iinputsystem.h"
#include "render/irenderdriver.h"

namespace rengine3d {

	//!  Interface for engine kernel class
	class IKernel: public ISubSystem {
	public:
		virtual ~IKernel(){};

		static RENGINE3D_API IKernel* GetKernel(void* hwnd = NULL);
		static RENGINE3D_API void ReleaseKernel();

		virtual bool RegisterSubSystem(ISubSystem* subSystem) = 0;
		virtual ISubSystem* GetSubSystem(string_t name) = 0;

		virtual ILog* GetLog( void ) = 0;
		virtual IFileSystem* GetFileSystem( void ) = 0;
		virtual IVarSystem* GetVarSystem(void) = 0;
		virtual ICmdSystem* GetCmdSystem( void ) = 0;
		virtual ISystem* GetSystem(void) = 0;
		virtual IUpdateSystem* GetUpdateSystem(void) = 0;
		virtual IInputSystem* GetInputSystem(void) = 0;

		virtual IRenderDriver* GetRenderDriver() = 0;

		virtual void SetLogFileName(string_t fileName) = 0;

		virtual void Run() = 0;
		virtual void Quit() = 0;
	};

}

#endif
